Colin Walters [Tue, 9 Mar 2010 22:31:06 +0000 (17:31 -0500)]
Shrink windows to small previews when dragging
Hide the original actor during a grab, and create a new
clone. This is easier than trying to ensure we maintain
the state of the original window clone.
Colin Walters [Fri, 12 Mar 2010 20:57:01 +0000 (15:57 -0500)]
Fix app icon fading
The way we were loading data into a CoglTexture, then pulling it out
and manipulating it on the CPU, then loading it back into a texture
was a bit lame.
Clean things up a bit here by loading directly into the CPU, doing
the fading, then creating a texture.
Dan Winship [Tue, 2 Mar 2010 18:51:00 +0000 (13:51 -0500)]
Error out at startup if the GConf schemas are missing
If we don't do this, then boolean/int/list keys will seem to sort of
work (but defaulting to false/0/[] instead of the correct schema
defaults), but string keys will return null, which will usually cause
exceptions or crashes.
Owen W. Taylor [Wed, 10 Mar 2010 23:32:10 +0000 (18:32 -0500)]
Simplify handling of adjustments
The relationship between adjustments and scrollbars and
scrollable widgets was much more complex than it needed to be.
StScrollView: Have the scroll view own a pair of adjustments,
set them on the child on add(), remove unnecessary
change notification signal connections.
StBoxLayout: Remove auto-create of adjustments, just take the
adjustments from the scrollbars and set them on the scrollable
child. Notify for hadjustment/vadjustment properties.
StScrollBar: Notify adjustment property.
StScrollable: Document how adjustment setting works.
Owen W. Taylor [Wed, 10 Mar 2010 23:22:06 +0000 (18:22 -0500)]
Fixes for dispose and finalize
* Add missing chain-up for dispose and finalize methods
* ShellGenericContainer needs to destroy its children in dispose()
* Fix variable naming and excess casts in st_label_dispose()
Owen W. Taylor [Wed, 10 Mar 2010 18:57:05 +0000 (13:57 -0500)]
Fixes for setting up scrolling adjustments
StScrollable: Document how to set adjustments
StBoxLayout: Make sure that we always have upper >= lower + page_size,
so that clamping works properly. Set the page_increment to be slightly
less than the page_size so there is some overlap, as is customary.
StScrollView: Remove unnecessary fabs() calls, rewrite expressions
for additional clarity.
Owen W. Taylor [Wed, 10 Mar 2010 16:56:04 +0000 (11:56 -0500)]
Incremental fixes for scrollview work
- Fix existing typos and spacing problems
- Get preferred height, not current height, of shadows
- Let shadows overflow don't clamp them when we have too little space
- Remove a now-unecessary stray MAX()
- Fix up scrollview visibility for the pathological case of no child
- Disconnect from adjustments on remove()
- Don't unset the adjustments on the child on remove(), since they
already existed or were autocreated on add()
(We should what we are doing and set the adjustments of the
scrollbars on the child rather than setting the adjustments of
the child, so we match GTK+'s scrolllable interface, but this
at least makes it consistent instead of a weird mix.)
Owen W. Taylor [Fri, 5 Mar 2010 22:20:56 +0000 (17:20 -0500)]
Fix size negotiation for StScrollView
StScrollable: Document how size negotation now works between the
parent and scrollable child.
StBoxLayout: Adapt to the new contract for how size negotiation
works; in particular, handle being allocated less than the
minimum size when scrolled and treat the minimum size as the
size of the scrolled area in instead of the natural size.
StScrollView: Substantially rewrite with fixes including:
- Implement new size negotation contract; this allows us
to determine scrollbar visibility without having to
connect to the adjustment.
- Implement all ALWAYS along with the existing NEVER/AUTO
- When hiding and showing scrollbars and shadows, don't
hide and show widgets, just turn on and off including them
in pick and paint. This avoids queueing relayouts.
- Cleanups for the code for connecting to adjustments,
for changing policy, and for turning on and off shadows.
scroll-view-sizing.js: New test case for StScrollView, allowing
resizing the scroll view interactively, changing the scrollbar
policies and turning shadows on and off.
Owen W. Taylor [Fri, 5 Mar 2010 21:17:07 +0000 (16:17 -0500)]
[StScrollBar] avoid queueing a relayout during allocation
When an StScrollView is allocated, allocating the child would
cause the adjustment values to change, which would result in
the scrollbars queueing a relayout, which isn't allowed during
allocation.
To avoid this, instead of queueing a relayout when the adjustment
changes:
- When we have a valid allocation already, just go ahead
and reallocate the children.
- Otherwise do nothing immediately and wait until we get allocated
Because the 'needs_allocation' flag in ClutterActor isn't exposed,
this requires some slightly ugly code to shadow that state locally.
Owen W. Taylor [Wed, 3 Mar 2010 23:00:05 +0000 (18:00 -0500)]
Rework StDrawingArea not to use ClutterCairoTexture
Having StDrawingArea use ClutterCairoTexture causes circularity
problems with sizing - StDrawingArea wants to use its allocation for
the size of the texture, but ClutterTexture wants to use the size of
the texture to determine the requited size.
Avoid this by making StDrawingArea directly use Cairo and CoglTexture;
while doing this, the API is changed a bit for simplicity and to
match our use case:
- Instead of clutter_cairo_texture_create(), we have
st_drawing_area_get_context() to retrieve an already created
context. This can only be called in the ::repaint signal.
- The ::redraw signal is changed to ::repaint so we can have
st_drawing_area_queue_repaint() that doesn't collide with
clutter_actor_queue_redraw()
- ::repaint is now emitted lazily when painting the actor rather
than synchronously at various different points.
Owen W. Taylor [Thu, 11 Feb 2010 20:24:13 +0000 (15:24 -0500)]
Support and require Clutter 1.2
- Specify a minimum version of clutter-1.2.0
- Switch clutter branch in the moduleset to master
- Replace deprecated cogl_texture/material_unref() with
cogl_handle_unref()
- Use cogl_clip_push_rectangle() rather than cogl_clip_push()
- Replace cogl_check_extension() with strstr - should be
accurate enough.
Dan Winship [Wed, 17 Feb 2010 20:21:51 +0000 (15:21 -0500)]
st_widget_get_theme_node: g_error if called on an unparented widget
It's wrong to do anything that requires looking up a widget's style
before you add the widget to the stage, since its final style may
depend on properties inherited from its parents.
st_widget_get_theme_node() used to emit a warning in this case, but
many would-be contributors apparently didn't notice. Help them out.
Adel Gadllah [Sun, 7 Mar 2010 18:33:58 +0000 (19:33 +0100)]
Don't activate workspace when more than one window is open
Currently clicking on an empty spot on the workspace actors switches to the workspace, this has a side effect that when for some reason (like using a touchpad),
the user misses the window he intends to open he will end up with the currently focused window instead.
Disable this behaviour if more than one window is open (in that case the user has to explicitly target a specific window).
Florian Müllner [Fri, 26 Feb 2010 19:07:44 +0000 (20:07 +0100)]
[runDialog] Support opening files and folders
Support completion on files and folders in the run dialog and launch
the default application when activated. Assume a path relative to the
home directory if execution as command fails and the input doesn't start
with a slash.
Removed workaround for relayout of error messages.
Maxim Ermilov [Mon, 8 Mar 2010 22:50:49 +0000 (01:50 +0300)]
Look at current mouse position for dropping
Previously we used the top-left corner which was not intuitive,
particularly when dragging partially opaque actors.
https://bugzilla.gnome.org/show_bug.cgi?id=607821
Set this._notificationRemoved to false in _hideNotificationComplete()
We used to set this._notificationRemoved to false in _hideNotification().
However, the user focusing on the associated application can result in the
source being removed while the notification is hiding, in which case
this._notificationRemoved was set to true and never unset. This resulted in
the next notification only showing up briefly and hiding. Moving setting
this._notificationRemoved to false to _hideNotificationComplete() fixes this
behavior.
Colin Walters [Mon, 8 Feb 2010 19:57:33 +0000 (14:57 -0500)]
Remove st_widget accessors for background and border actors
StButton animated the background for button transitions; since these aren't
presently part of the shell design, simply remove them. We can readd
these in the future.
StTooltip should probably have :vertical and :horizontal pseudo classes
to make the arrow work but it should still function.
Colin Walters [Tue, 9 Feb 2010 20:12:28 +0000 (15:12 -0500)]
Rework internals to be string based
Rather than having ShellTextureCache know about the type of each
item it's caching, this lays the foundation for simply caching
arbitrary string -> CoglHandle.
Thomas Wood [Tue, 20 Oct 2009 13:22:17 +0000 (14:22 +0100)]
fix issues with hint text
Add a "hint_visible" private variable to keep track of when the hint text
is visible. Use this to determine whether to return the text from the
internal ClutterText or whether to return an empty string.
Florian Müllner [Wed, 3 Mar 2010 23:10:16 +0000 (00:10 +0100)]
[Overview] Fix click handling of open panes
The top part of the application pane closes the pane, while outside
the menu only the workspace area accepts clicks for closing the pane.
Let the user close the pane by clicking anywhere outside the menu, but
not inside.
Florian Müllner [Sun, 28 Feb 2010 06:56:04 +0000 (07:56 +0100)]
[Overview] Delay repositioning after closing windows
When closing windows in the window picker, the remaining windows
move to their new positions, which prevents the user from performing
additional actions in the picker until the animation stops and the
user adjusts to the new layout.
Instead we try to be smart and delay the repositioning, either until
the pointer stops moving or until it leaves the workspace.
Colin Walters [Tue, 9 Feb 2010 18:24:33 +0000 (13:24 -0500)]
Add st_texture_cache_load_file_to_cogl_texture
For StWidget we want the ability to load raw CoglHandle references
rather than having a big pile of actors backing StWidget.
Several bits of StWidget expect to be able to synchronously load
textures; this is a crutch to support that until we can cleanly
make this asynchronous.
Colin Walters [Tue, 9 Feb 2010 17:42:07 +0000 (12:42 -0500)]
Merge St.TextureCache and Shell.TextureCache
Brute force merge these two by essentially replacing St.TextureCache
with a (renamed) Shell.TextureCache.
One function was added for convenience, namely "st_texture_cache_load_file_simple".
St.TextureCache had a function to load a texture from a filename, and it
returned NULL on error but only half the callers actually checked this. This
function is better.
Colin Walters [Fri, 5 Mar 2010 20:23:42 +0000 (15:23 -0500)]
Clean up definition of dragOffsetX, dragOffsetY
These variables were computed strangely; through cancellation
they'd end up being negative 1/2 the width/height of the actor,
so just use that directly.
The current check looks at whether there was some am/pm suffix in the
localized time; however in some cases (locales) that does not seem to
work. this version instead checks whether the localized versions of 05:00 and
17:00 start with the same two digits; if not, it's probably a 24h clock.
Colin Walters [Thu, 4 Mar 2010 20:08:24 +0000 (15:08 -0500)]
[search] Fix activation of results from custom renderers
The previous commit broke activation when selecting an actor
from a custom renderer. Fix this by explicitly defining a method
activateSelected on the search renderer.
Owen W. Taylor [Fri, 26 Feb 2010 17:48:07 +0000 (12:48 -0500)]
Fix problems on destruction
StScrollBar: Be robust against being disposed multiple times,
which can happen, and in fact, normally happens when destroying
the parent.
StScrollView: Implement remove() for the hscroll and vscroll members,
and just destroy them in dispose() and let them be removed.
unparent the shadows, instead of just unref'ing them directly.
Florian Müllner [Fri, 26 Feb 2010 15:45:05 +0000 (16:45 +0100)]
[Overview] Base minimum motion on actors
When figuring out where to position window previews, use the clone's
position instead of the the original meta window. There shouldn't be
a difference when entering the overview, but it makes the motion when
opening/closing new windows in the overview tinier and more predictable.
Adel Gadllah [Sun, 28 Feb 2010 20:51:34 +0000 (21:51 +0100)]
Fix tracking of single-process multi app cases
When starting oocalc or ooimpress from oowriter's menu get_app_for_window,
fails to recognize the newly started up as such, which result into the appMenu
still showing "Openoffice.org Writer" as app name.
Fix this by trying to window itself first before using the group for finding the app.
Colin Walters [Sun, 28 Feb 2010 20:51:28 +0000 (15:51 -0500)]
[panel] Handle async load of icons correctly
Fading the application icon required the texture to have already been
loaded, which was normally the case since we create icons for apps
in the well and browser; but when finding an app not from there,
the cogl-texture for the icon might not be available.
Fix this by watching for the texture and fading when it appears.
Colin Walters [Sun, 28 Feb 2010 20:36:13 +0000 (15:36 -0500)]
[panel] Fix AppPanelMenu's allocation
Because we were setting the "fixed-position-set" property
on the internal label, its width/height requests weren't
being accounted for in the size request of the overall box.
The way we were hooking up to notify::allocation was hacky; do
this correctly by simply implementing a container.
Florian Müllner [Mon, 18 Jan 2010 03:16:39 +0000 (04:16 +0100)]
[lookingGlass] Add style information to the picker
Currently the picker displays information on the hovered actor's
position and the object itself. Adding style id and class of
StWidgets to the displayed information can be very helpful for
identifying a particular actor or code segment.
Florian Müllner [Wed, 24 Feb 2010 20:46:00 +0000 (21:46 +0100)]
Simulate a focus-app change when leaving the overview
When the currently focused app sends a notification while in the overview,
the corresponding source icon is not removed when the overview is left.
It does make some sense to treat the overview transition the same as a
normal focus change, so we should update the summary view accordingly.
Florian Müllner [Tue, 23 Feb 2010 14:58:33 +0000 (15:58 +0100)]
Fix clicking on notification icons after updates
When a notification is updated by the application, the corresponding
app in its source is lost, so it is no longer possible to switch to
the application by clicking either the notification or the summary icon.
As the associated application of a source never changes, it appears safe
to leave it alone on notification updates.
Florian Müllner [Sun, 21 Feb 2010 05:25:23 +0000 (06:25 +0100)]
Remove source icon when a corresponding window is activated
Source icons are no longer needed to inform the user about events
having occured in a particular application when (s)he activates the
window - treat that case just as if the user had clicked the source
icon.
Owen W. Taylor [Tue, 23 Feb 2010 15:43:39 +0000 (10:43 -0500)]
Fix installation of .mo files
The recent cleanup of the configure.ac cleanups accidentally
removed AC_SUBST(GETTEXT_PACKAGE); more precisely restore this
section back to its original state.
Owen W. Taylor [Tue, 23 Feb 2010 03:07:20 +0000 (22:07 -0500)]
Fix include path when building Shell-1.0.gir
Since shell-slicer.h includes st.h, and that includes
<st/*.h>, we need to add -I $(srcdir) to the command line when
running g-ir-scanner to generate Shell-1.0.gir.
Owen W. Taylor [Tue, 23 Feb 2010 00:35:03 +0000 (19:35 -0500)]
Don't generate st.h in a subdir
For srcdir != builddir, in the builddir, the st/ subdirectory doesn't
exist, so we can't generate st.h there. Just switch to building st.h
directly in the current directory. (The other option would be to
create a st/ subdirectory in the builddir if necessary; might be a
little cleaner, but this works for now and gets things distchecking.)
Owen W. Taylor [Tue, 23 Feb 2010 00:21:42 +0000 (19:21 -0500)]
Convert the check-for-missing files check to a python script
'git ls-files --exclude=<pattern>' was changed (intentionally!)
not to exclude anything files that are actually in the index.
Since git ls-files by default simply lists the files in the
index, this is a problem. Emulating this in shell went past
the limits of what made sense, so move it to a simple external
python script.
Florian Müllner [Mon, 22 Feb 2010 21:05:42 +0000 (22:05 +0100)]
Always make notifications with '\n' in bannerText expandable
Right now notifications are expandable if the length of bannerText
exceeds the notification's width - however, if bannerText contains
newlines, it should be expandable regardless of the length.
Florian Müllner [Mon, 15 Feb 2010 22:11:09 +0000 (23:11 +0100)]
Cancel zoom of non-focused windows when leaving overview
When leaving the overview by hitting escape or super, all windows animate
to their original positions. Zoomed windows are kept above others until
the animation ends, then the focused window is brought to the front; as
this looks odd if the zoomed window does not have focus, cancel the zoom
in that case before leaving the overview.
Florian Müllner [Sun, 7 Feb 2010 14:25:16 +0000 (15:25 +0100)]
Fix problems when leaving the overview with a zoomed window
While zooming, a window clone is reparented to the stage and thus cannot
be destroyed automatically by the "parent" container. To prevent the clone
and the corresponding overlay from leaking, we enforce destroying the clone
with the workspace.